package tcln.sors.model.core.util.dataloader;

import org.springframework.context.ApplicationContext;

import tcln.commons.command.VoidCommand;
import tcln.sors.model.core.dao.DaoFactory;

/**
 * @author Truong Chau Lien Ngoc (lienngoc@gmail.com)
 * 
 */
public abstract class DataLoadingCommand extends VoidCommand<Object> {
    private ApplicationContext applicationContext;
    private DaoFactory daoFactory;
    
    /**
     * {@inheritDoc}
     */
    @Override
    public String getName() {
        return getClass().getSimpleName();
    }

    protected ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    protected DaoFactory getDaoFactory() {
        return daoFactory;
    }

    void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    void setDaoFactory(DaoFactory daoRegistry) {
        this.daoFactory = daoRegistry;
    }
}
